var stocks = [
    {symbol: 'MSFT', value: '300'},
    {symbol: 'GOOGLE', value: '600'},
    {symbol: 'APPLE', value: '700'},
    {symbol: 'GOOGLE', value: '300'}
];

function getStocks(symbolName){
    var output = [];
    for(var i = 0; i < stocks.length; i++){
        if(stocks[i].symbol === symbolName){
            output.push(stocks[i]);
        }
    }
    return output;
}

getStocks('GOOGLE');


function getSymbols(stocks){
    var i, output = [];
    for(i = 0; i < stocks.length; i++){
        output.push(stocks[i].symbol);
    }
    return output;
}

getSymbols(stocks);